package com.example.demo;

import com.example.demo.entity.Canteen;
import com.example.demo.rulesEngine.listener.RulesEngineFactory;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SpringbootEasuRulesDemoApplication {

  public static void main(String[] args) throws Exception {
    // SpringApplication.run(SpringbootEasuRulesDemoApplication.class, args);

    RulesEngineFactory.BizRuleEngine canteenRuleEngine =
        RulesEngineFactory.buildRuleEngine4Canteen();

    Canteen canteen = new Canteen().setName("这是啥餐厅").setProductId(1).setType(1);

    canteenRuleEngine.fire(canteen);

    System.out.println(canteen);
  }
}
